package com.jiaming.restaurant.api.common.response;

import lombok.Data;

/**
 * @author dragon
 * @create 2021-03-01 19:41
 */
@Data
public class ResultVo<T> {
    private Integer code;
    private String msg;
    private  T data;

    public ResultVo(ResultCodeEnum resultCode) {
        this.code = resultCode.getCode();
        this.msg = resultCode.getMsg();
    }

    public ResultVo(ResultCodeEnum resultCode,T data) {
        this(resultCode);
        this.data = data;
    }
}
